#include <stdio.h>
#include <string.h>
#include "trim.h"
#include <ctype.h>
void trim(char* buf)
{
	int start = 0;
	int end = strlen(buf)-1;
	while(start<strlen(buf)&&isspace(buf[start]))
	{
		start++;
	}
	while(end>0&&isspace(buf[end]))
	{
		end--;
	}
	int i,j;
	for(i = start,j = 0;i<=end;i++,j++)
	{
		buf[j] = buf[i];
	}
	buf[j] = '\0';
	//printf("buf:%s\n",buf);

}
